package com.boot2523.mapper;

import com.boot2523.bean.Emp;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import javax.servlet.http.Part;
import java.util.List;

public interface EmpMapper {
    @Insert(value = "insert into emp(ename,epic,epic2,deptno,job,sal) values(#{ename},#{epic},#{epic2},#{deptno},#{job},#{sal})")
    public int insert(Emp e);
    public List<Emp> all(String path);
    @Delete(value = "delete from emp where empno=#{id}")
    public int del(int id);
    @Select(value = "select * from emp where empno=#{param2}")
    public Emp one(String path,int id);
    @Select(value = "select * from emp where empno=#{id}")
    public Emp one2(int id);
    @Update(value="update emp set ename=#{ename},job=#{job},sal=#{sal} where empno=#{empno}")
    public int update(Emp e);
    public int updateSelective(Emp e);
}
